package com.hsh.gaoqianlianmeng.domain;

import com.hsh.gaoqianlianmeng.anno.Alia;
import com.hsh.gaoqianlianmeng.anno.SheetInfo;
import lombok.Data;

import java.util.Objects;

@Data
@SheetInfo(name = "汇率")
public class ExchangeRate {
    @Alia("付款币种编码")
    private String payCurrencyCode;

    @Alia("基础币种编码")
    private String baseCurrencyCode;

    /**
     * 1 付款币种 =  xxx 基础币种
     */
    @Alia("汇率")
    private String exchangeRate;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof ExchangeRate)) return false;
        ExchangeRate that = (ExchangeRate) o;
        return Objects.equals(payCurrencyCode, that.payCurrencyCode) && Objects.equals(baseCurrencyCode, that.baseCurrencyCode);
    }

    @Override
    public int hashCode() {
        return Objects.hash(payCurrencyCode, baseCurrencyCode);
    }
}
